import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import spring_annotation.aop.MathCalculator;
import spring_annotation.config.MainAOPConfig;

public class IOCTest_AOP {

    private AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(MainAOPConfig.class);

    @Test
    public void test01(){
        MathCalculator mathCalculator = ac.getBean(MathCalculator.class);
        mathCalculator.div(1,1);
//        mathCalculator.div(1,0);
        ac.close();
    }
}
